<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link rel="stylesheet"  href="../../static/layui/css/layui.css" data-th-href="@{/layui/css/layui.css}">
    <script src="../../static/layui/layui.js" data-th-src="@{/layui/layui.js}"></script>

</head>
<body>
<form  method="post" class="layui-form" data-th-action="@{/insertNew}" enctype="multipart/form-data">
    <div class="layui-form-item">
        <label class="layui-form-label">新闻类别</label>
        <div class="layui-input-block">
            <select name="category" >
                <option value=""></option>
                <option value="1">热门资讯</option>
                <option value="2">高考资讯</option>
                <option value="3">院校动态</option>
                <option value="4">招生政策</option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">新闻标题：</label>
        <div class="layui-input-block">
            <input type="text" name="title" required  lay-verify="required" placeholder="请输入新闻标题" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">新闻简介：</label>
        <div class="layui-input-block">
            <input type="text" name="introduction" required  lay-verify="required" placeholder="请输入新闻简介" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">发布人：</label>
        <div class="layui-input-inline">
            <input type="text" name="author"  placeholder="请输入发布人" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">正文</label>
        <div class="layui-input-block">
            <textarea name="text" placeholder="请输入内容" class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">图片ID：</label>
        <div class="layui-input-block">
            <input type="number" name="pid">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">图片上传：</label>
        <div class="layui-input-block">
            <input type="file" name="file">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>

</form>


<script data-th-inline="javascript">
    //Demo
    layui.use(['form','jquery'], function(){
        let {form,$,layer} = layui;

    });
</script>

</body>
</html>